
<?php
include("classes/include.php");
session_start();
$etudiant = $_GET['numetudiant'];

$requete = new RequeteSQL("SELECT DISTINCT DATE_FORMAT( age_date, '%Y-%m-%d' ) as date,DATE_FORMAT( age_date, '%H:%i' ) as heure, age_intitule FROM etudiant etu, agenda age WHERE etu.etu_num_etudiant =".$etudiant." AND etu.etu_num_etudiant = age.age_num_etudiant");
$requete->executeQuery();
while ($donnees = $requete->fetch())
{
$date = $donnees['date'];
$horaire="horaire: ";
if($donnees['heure'] == "00:00" ){
$donnees['heure']=" ";
$horaire="";

}
$tab[] = array('title'     =>" ".$donnees['age_intitule'].$horaire.$donnees['heure'],
		  'start'     => $date);
}

echo json_encode($tab);
?>

